﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LanguageConfigurationSolution
{
    /// <summary>
    /// This class is used by the ContentByQueryWebPart, DataFormWebPart
    /// </summary>
    public class LanguageConfigurationExtensionObject
    {
        private static LanguageConfigurationExtensionObject _Instance;

        public static LanguageConfigurationExtensionObject Instance
        {
            get
            {
                if (_Instance == null)
                {
                    _Instance = new LanguageConfigurationExtensionObject();
                }
                return _Instance;
            }
        }

        public string Value(string ConfigurationlistName, string Key)
        {
            return ConfigurationReader.GetConfigurationValue(Key, ConfigurationlistName, string.Empty);
        }

        public string Value(string Key)
        {
            return ConfigurationReader.GetConfigurationValue(Key, string.Empty, string.Empty);
        }
    }
}
